﻿@using GdHotel.Data
@using GdHotel.Web.Models
@model ShowModel

@{
    ViewBag.Title = Model.Page.Title;
}

@section gallery{
    @if (Model != null && Model.PageGallery != null)
    {
        <text>@Html.Partial("_ShowGallery", Model.PageGallery)</text>
    }
}

<div class="wrap">
    <div class="content">
        <div class="in_content down clearfix">
            <div class="block">
                <h1>@Model.Page.Title</h1>
                <div class="in_block">
                    @Html.Raw(Model.Page.Text)
                </div>
                @if (Model != null & Model.Gallery != null)
                {
                    var gallery = Model.Gallery;
                    <text>@Html.Partial("_ShowInnerGallery", gallery)</text>
                }
            </div>
        </div>
    </div>
    <!--sidebar-->
    <div class="sidebar">
        <!--in_sidebar-->
        <div class="in_sidebar down clearfix">
            @if (Model.Page.SideBlocks.Count() > 0)
            {
                <ul class="promo_list">
                    @foreach (SideBlockCustomPage relation in Model.Page.SideBlocks)
                    {
                        @Html.Partial("_SideBlockPartial", relation.SideBlock)
                    }
                </ul>
            }
        </div>
    </div>
</div>